{% extends "base.html" %}

{% load i18n %}

{% block content %}
 <div class="row" style="background-image: ../Archivos/img/stripes.png">
    <div class="span12">
    <table><tbody><tr>
  	  <td><img style="width: 302px;max-width:none" alt="Logo" src="../Archivos/Logo.png"></img></td>
      <td><h1 style="font-size: 90px;">TiBus</h1><h4>Sistema de predicción de tiempos de arribos</h4></td>
      </tr></tbody></table>      
    </div>
  </div>
  <div>
{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
<p class="errornote">
{% blocktrans count form.errors.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
</p>
{% endif %}

{% if form.non_field_errors or form.this_is_the_login_form.errors %}
{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %}
<p class="errornote">
    {{ error }}
</p>
{% endfor %}
{% endif %}
        
                	
<form action="{{ app_path }}" class="form-horizontal" method="post" id="login-form">{% csrf_token %}
<legend>Tibus login</legend>
<div class="control-group">
  {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %}
  <label for="id_username" class="required">{% trans 'Username:' %}</label> {{ form.username }}
</div>
<div class="control-group">
  {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %}
  <label for="id_password" class="required">{% trans 'Password:' %}</label> {{ form.password }}
  <input type="hidden" name="this_is_the_login_form" value="1" />
  <input type="hidden" name="next" value="admin" />
</div>
<div class="control-group">
<!-- 	<input type="button" name="back" id="cak" value="Volver" onClick="javaScript:history.back();"> -->
    <input class="btn-primary" type="submit" class="btn" value="Iniciar Sesion" />
  </div>
</form>
</div>
{% if error %}<div>Error: {{ error }}</div>{% endif %}
			
<script type="text/javascript">
	document.getElementById('id_username').focus()
</script>
		
{% endblock %}
